# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
#   cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
#   Mayor.create(:name => 'Emanuel', :city => cities.first)

Owner.create()

sellers = Seller.create([
  {:name => 'Raj', :initial_balance => 50.50 },{:name => 'Chinna', :initial_balance => 50.50}
])

Customer.create([
  {:name => 'ramya',:initial_balance => 127.5},{:name => 'baby',:initial_balance => 9850.22}
])
Stock.create([
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'philips',:name => 'ding bulbs',:purchase_cost => '10.10',:quantity => 10, :sale_cost => 10.50, :seller_id => sellers.first.object_id},
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'sony a',  :name => 'din4 fan', :purchase_cost => '10.10',:quantity => 10, :sale_cost => 10.50, :seller_id => sellers.first.object_id},
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'crompton', :name => 'di3g ', :purchase_cost => '10610',:quantity => 10, :sale_cost => 10.50,  :seller_id => sellers.first.object_id},
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'philips',  :name => 'di5g ', :purchase_cost => '14.10', :quantity => 10, :sale_cost => 10.50,  :seller_id => sellers.first.object_id},
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'havlies',  :name => 'di3g bulbs',:purchase_cost => '10.10',:quantity => 10,:sale_cost => 10.50,:seller_id => sellers.first.object_id},
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'manas',  :name => 'di7g bulbs', :purchase_cost => '13330', :quantity => 10, :sale_cost => 10.50,:seller_id => sellers.last.object_id},
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'philips',  :name => 'di2g bulbs', :purchase_cost => '13.10',:quantity => 10,:sale_cost => 10.50,:seller_id => sellers.last.object_id},
  {:purchase_quantity=>10, :commission=>5,:tax_percentage=>14.5,:seller_id=>1,:company => 'philips',  :name => 'ma fans', :purchase_cost => '10.10',:quantity => 10, :sale_cost => 10.50, :seller_id => sellers.last.object_id}
])

Electrician.create([
  {:name => 'mark', :initial_balance => 50.50},{:name =>'Mike', :initial_balance => 50.50}
])
